package com.xuecheng.api.media;

import com.xuecheng.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.multipart.MultipartFile;

/*
http://localhost:31400/swagger-ui.html#/
swagger访问地址
 */
@Api(value = "媒资管理接口", description = "媒资管理接口，提供文件上传，文件处理等接口")
public interface MediaUploadControllerApi {
    @ApiOperation("文件上传注册")
    ResponseResult register(String fileMd5,
                                   String fileName,
                                   Long fileSize,
                                   String mimetype,
                                   String fileExt);

    @ApiOperation("检查文件分块")
    ResponseResult checkChunk(String fileMd5,
                              Integer chunk,
                              Integer chunkSize);

    @ApiOperation("上传分块")
    ResponseResult uploadChunk(MultipartFile file,
                               Integer chunk,
                               String fileMd5);

    @ApiOperation("合并分块文件")
    ResponseResult mergeChunks(String fileMd5,
                                   String fileName,
                                   Long fileSize,
                                   String mimetype,
                                   String fileExt,
                               Integer chunkNum);
}
